package com.mihoyo.basic.query;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class BaseQuery {

    // 当前页,默认为1
    private Integer currentPage = 1;

    // 每页显示条数，默认为5
    private Integer pageSize = 5;

    // 计算分页起始位置
    public Integer getStart() {
        return (this.currentPage - 1) * this.pageSize;
    }

}
